package com.stu.fifthtry.mapper;


import org.apache.ibatis.annotations.*;

import com.stu.fifthtry.pojo.Subject;
@Mapper
public interface SubjectMapper {

    @Select("select * from stusys.subject where name like concat('%',#{name},'%')")
    Subject getByName(String name);

    @Delete("delete from stusys.subject where name=#{name}")
    void delete(String name);

    @Insert("insert into stusys.subject (remark, graduation_credits, stop_status, name) values (#{remark}, #{graduationCredits}, #{stopStatus}, #{name})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    void save(Subject subject);


    void update(Subject subject);
}
